home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
mui
/
MCC_TWFmLED.lha
/
MCC_TWFmultiLED
/
Developer
/
Autodocs
/
MCC_TWFmultiLED.doc
next >
Wrap
Text File
|
1999-02-25
|
6KB
|
183 lines
TABLE OF CONTENTS
TWFmultiLED.mcc/TWFmultiLED.mcc
TWFmultiLED.mcc/MUIA_TWFmultiLED_Colour
TWFmultiLED.mcc/MUIA_TWFmultiLED_Custom
TWFmultiLED.mcc/MUIA_TWFmultiLED_Free
TWFmultiLED.mcc/MUIA_TWFmultiLED_TimeDelay
TWFmultiLED.mcc/MUIA_TWFmultiLED_Type
TWFmultiLED.mcc/TWFmultiLED.mcc TWFmultiLED.mcc/TWFmultiLED.mcc
This class is a fairly simple implementation of a "LED-like" indicator which
provides the programmer with a new method for communicating program state to
the user. Unlike other similar implementations, TWFmultiLED allows both the
user and programmer to specify both the shape of the indicator and it's colour.
Via the preferences program the user can specify the RGB makeup of the 6
internal colours (used to represent the states "Off", "On", "Ok", "Loading",
"Error" and "Panic") and the default shape of the indicator. The programmer
can abide by the user's choice of shape, or override it and use one fo the
other shapes. The programmer can also set the indicator to any of the 6 user
defined colours or to a custom colour the programmer specifies.
TWFmultiLED.mcc/MUIA_TWFmultiLED_Colour
NAME
MUIA_TWFmultiLED_Colour -- [IS.], ULONG
INPUTS
MUIV_TWFmultiLED_Colour_Off Set LED to user defined Off colour.
MUIV_TWFmultiLED_Colour_On Set LED to user defined On colour.
MUIV_TWFmultiLED_Colour_Ok Set LED to user defined Ok colour.
MUIV_TWFmultiLED_Colour_Working Set LED to user defined Working colour.
MUIV_TWFmultiLED_Colour_Waiting Set LED to user defined Waiting colour.
MUIV_TWFmultiLED_Colour_Load Set LED to user defined Load colour.
MUIV_TWFmultiLED_Colour_Cancelled Set LED to user defined Cancelled colour.
MUIV_TWFmultiLED_Colour_Stopped Set LED to user defined Stopped colour.
MUIV_TWFmultiLED_Colour_Error Set LED to user defined Error colour.
MUIV_TWFmultiLED_Colour_Panic Set LED to user defined Panic colour.
MUIV_TWFmultiLED_Colour_Custom Set LED to programmer specified colour
MUIV_TWFmultiLED_Colour_Off is the default value.
FUNCTION
This attribute allows you to change the colour shown in the indicator. The
indicator will only change colour if the value you specify is valid and
the pen for that colour has been obtained successfully.
NOTE
Specifying MUIV_TWFmultiLED_Colour_Custom will have no effect unless you
have set a value for MUIA_TWFmultiLED_Custom AND the window is open.
Specifying MUIV_TWFmultiLED_Colour_Custom during initialisation will have
no effect.
BUGS
No known bugs.
SEE ALSO
MUIA_TWFmultiLED_Custom
TWFmultiLED.mcc/MUIA_TWFmultiLED_Custom
NAME
MUIA_TWFmultiLED_Custom -- [IS.], struct TWFmultiLED_RGB *
FUNCTION
Using this attribute, the programmer can specify an RGB value to display in
the indicator. The RGB values should be 32 bit left justified fractions
as used by graphics.library/SetRGB32()
EXAMPLE
struct TWFmultiLED_RGB egColour = { 0xFFFFFFFF, 0, 0xFFFFFFFF };
...
Child, ML_Indicator = TWFmultiLEDObject,
...
End,
...
set(ML_Indicator, MUIA_TWFmultiLED_Custom, &egColour);
set(ML_Indicator, MUIA_TWFmultiLED_Colour, MUIV_TWFmultiLED_Colour_Custom);
BUGS
No known bugs.
SEE ALSO
MUIA_TWFmultiLED_Colour, graphics.library/SetRGB32
TWFmultiLED.mcc/MUIA_TWFmultiLED_Free
NAME
MUIA_TWFmultiLED_Free -- [IS.], BOOL
FUNCTION
This attribute only affects the square and rectangular indicators. If set
to TRUE then both the maximum height and width are set to 40. The indicator
will resize as the user changes the window size.
BUGS
No known bugs.
TWFmultiLED.mcc/MUIA_TWFmultiLED_TimeDelay
NAME
MUIA_TWFmultiLED_TimeDelay -- [IS.], ULONG
INPUTS
Delay, in seconds, between the LED colour being set and it being automatically
reset to MUIV_TWFmultiLED_Colour_Off. To deactivate this feature you can
supply the special value.
SPECIAL VALUES
MUIV_TWFmultiLED_TimeDelay_User Use the user's setting
MUIV_TWFmultiLED_TimeDelay_Off Disable the deactivation feature.
(This is the default)
FUNCTION
This attribute allows an indicator lamp to "turn itself off" automatically
after a delay period. This could be useful in many situations, especially
if the indicator is being used to display repeating events.
BUGS
None reported. This is the least tested of the features so there may be
some bugs I have not found. Please inform me immediately if anything
unexpected occurs while using this attribute.
SEE ALSO
TWFmultiLED.mcc/MUIA_TWFmultiLED_Type
NAME
MUIA_TWFmultiLED_Type -- [IS.], ULONG
INPUTS
MUIV_TWFmultiLED_Type_Round5 Indicator is drawn as a small circle.
MUIV_TWFmultiLED_Type_Round11 Indicator is drawn as a large circle.
MUIV_TWFmultiLED_Type_Square5 Indicator is drawn as a small square.
MUIV_TWFmultiLED_Type_Square11 Indicator is drawn as a large square.
MUIV_TWFmultiLED_Type_Rect11 Indicator is drawn as a small rectangle.
MUIV_TWFmultiLED_Type_Rect15 Indicator is drawn as a large rectangle.
MUIV_TWFmultiLED_Type_User The indicator shape is set by the user,
this is the default.
FUNCTION
This attribute allows the programmer to alter the shape of the indicator.
This should not be used unless absolutely necessary - the user's
preference is the default and you should not override it unless you
have a very good reason.
NOTE
When you set this attribute, the indicator will be temporarily hidden
and then redisplayed. This forces MUI to ask for the indicator's
dimensions but it may affect your layout.
BUGS
No known bugs.
SEE ALSO